//
//  DropdownTipButton.h
//  Etion
//
//  Created by wu jingxing on 12-2-12.
//  Copyright (c) 2012年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger,EDropdownTipButtonType)
{
    EDropdownTipButtonTypeTitle,
    EDropdownTipButtonTypeVCLCTRL
};

typedef NS_ENUM(NSUInteger,EDropdownTipButtonContentAlignment)
{
    EDropdownTipButtonContentAlignmentCenter,
    EDropdownTipButtonContentAlignmentLeft,
    EDropdownTipButtonContentAlignmentRight
};

@class CDropdownTipButton;

@protocol CDropdownTipButtonDelegate<NSObject>

-(void)dropdownTipButtonClick:(CDropdownTipButton*)btn;

@end

@interface CDropdownTipButton : UIView
{
    UILabel* _textLabel;
    UIImageView* _arrow;
    UIImageView* _headImage;
    
    EDropdownTipButtonContentAlignment _alignment;
    
    EDropdownTipButtonType m_type;
    
    __unsafe_unretained id<CDropdownTipButtonDelegate> _delegate;
}

@property (nonatomic, assign) id<CDropdownTipButtonDelegate> delegate;
@property (nonatomic, readonly) UILabel* textLabel;
@property (nonatomic, assign) EDropdownTipButtonContentAlignment alignment;

-(id)initWithFrame:(CGRect)frame type:(EDropdownTipButtonType)type;

-(void)setText:(NSString*)szText animate:(BOOL)bAnimate;

-(void)setImage:(UIImage*)image animate:(BOOL)bAnimate;

//默认图片资源名：img_dropdowninstruct.png
-(void)setArrowImage:(UIImage*)image animate:(BOOL)bAnimate;

-(void)rotationArrowImage;

@end
